package com.lanling.eduservice.controller;

import com.lanling.eduservice.orther.R;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 胡振华
 * @date 2020-10-06 18:20
 */
@RestController
@RequestMapping("/eduservice/user")
@CrossOrigin
public class EduLoginController {

    @RequestMapping("login")
    public R login(){
        return R.ok().data("token","admin");
    }

    @RequestMapping("info")
    public R info(){
        return R.ok().data("name","胡振华").data("roles","admin").data("avatar","https://www.zhengzhoudaxue.cn/images/photo/xusong1.png");
    }

}